<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: esp8266/uart.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_cc2d49507704e901eabd8a82be491fc5.html">esp8266</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">uart.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="uart_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="user__config_8h.html">user_config.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="uart_8h.html">uart.h</a>&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="esp8266_2uart__register_8h.html">uart_register.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef TELNET_SERIAL</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">extern</span> <a class="code" href="structqueue__t.html">queue_t</a> *bridge_send_queue;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">extern</span> <a class="code" href="structqueue__t.html">queue_t</a> *bridge_receive_queue;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="uart_8c.html#a14061d90f6727665218418b15943af7f">   34</a></span>&#160;<span class="preprocessor">#define UARTS 2</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">    #ifdef UART_QUEUED_TX</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="structqueue__t.html">queue_t</a> *uart_txq[<a class="code" href="uart_8c.html#a14061d90f6727665218418b15943af7f">UARTS</a>]  = { <a class="code" href="cpu_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="code" href="cpu_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> };</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">    #ifdef UART_QUEUED_RX</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <a class="code" href="structqueue__t.html">queue_t</a> *uart_rxq[<a class="code" href="uart_8c.html#a14061d90f6727665218418b15943af7f">UARTS</a>]  = { <a class="code" href="cpu_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="code" href="cpu_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> };</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="uart_8c.html#a08d467da958b2c20aaa794953255d152">   43</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a08d467da958b2c20aaa794953255d152">uart_debug_port</a> = 0;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment">// @brief low level UART functions</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="uart_8h.html#ae08356fea716912edfef1013171b24ba">   52</a></span>&#160;<span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart_8c.html#ae08356fea716912edfef1013171b24ba">uart_rx_enable</a>(uint8 uart_no)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    SET_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#ac6ce538b7a0389b41640e89990d0d76d">UART_INT_ENA</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#adf96029f1be0842496155dcc8f6868de">UART_RXFIFO_FULL_INT_ENA</a>|<a class="code" href="esp8266_2uart__register_8h.html#ae07a4ee9c7e3c6828d0a2e0a3e4da0bf">UART_RXFIFO_TOUT_INT_ENA</a>);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="uart_8h.html#a4c32ce5693fc8c1a40244b5cc82e796e">   62</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a4c32ce5693fc8c1a40244b5cc82e796e">uart_rx_disable</a>(uint8 uart_no)</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    CLEAR_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#ac6ce538b7a0389b41640e89990d0d76d">UART_INT_ENA</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#adf96029f1be0842496155dcc8f6868de">UART_RXFIFO_FULL_INT_ENA</a>|<a class="code" href="esp8266_2uart__register_8h.html#ae07a4ee9c7e3c6828d0a2e0a3e4da0bf">UART_RXFIFO_TOUT_INT_ENA</a>);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="uart_8h.html#a9fee6d0362cbec0ae882acb55d3a825f">   72</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no)</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    SET_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#ac6ce538b7a0389b41640e89990d0d76d">UART_INT_ENA</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#aa1ab82a46ab6ea6c6fa443acb2301a2e">UART_TXFIFO_EMPTY_INT_ENA</a>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;}</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="uart_8h.html#a87198ab19fb4f97a978baf08b478d150">   82</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a87198ab19fb4f97a978baf08b478d150">uart_tx_disable</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;{</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    CLEAR_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#ac6ce538b7a0389b41640e89990d0d76d">UART_INT_ENA</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#aa1ab82a46ab6ea6c6fa443acb2301a2e">UART_TXFIFO_EMPTY_INT_ENA</a>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;}</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="uart_8h.html#a69f8feef88b9921367f37e8db445eeaf">   94</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a69f8feef88b9921367f37e8db445eeaf">tx_fifo_flush</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    SET_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#a92e318703bd3a12db8856182b046f76f">UART_CONF0</a>(uart_no),  <a class="code" href="esp8266_2uart__register_8h.html#aea9aaa17f3b5847f810191afe34de2db">UART_TXFIFO_RST</a>);  </div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    CLEAR_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#a92e318703bd3a12db8856182b046f76f">UART_CONF0</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#aea9aaa17f3b5847f810191afe34de2db">UART_TXFIFO_RST</a>); </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="uart_8h.html#a6b9147fc5ffaf0a602cc60a8addb8a38">  105</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a6b9147fc5ffaf0a602cc60a8addb8a38">rx_fifo_flush</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;{</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    SET_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#a92e318703bd3a12db8856182b046f76f">UART_CONF0</a>(uart_no),  <a class="code" href="esp8266_2uart__register_8h.html#ac7ce3d2ea688e9812d8758ce36d88b3e">UART_RXFIFO_RST</a>);  </div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    CLEAR_PERI_REG_MASK(<a class="code" href="esp8266_2uart__register_8h.html#a92e318703bd3a12db8856182b046f76f">UART_CONF0</a>(uart_no), <a class="code" href="esp8266_2uart__register_8h.html#ac7ce3d2ea688e9812d8758ce36d88b3e">UART_RXFIFO_RST</a>); </div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;}</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="uart_8h.html#a6f8397ebf08ae984ed48144d0287a048">  118</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a6f8397ebf08ae984ed48144d0287a048">tx_fifo_used</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;{</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(uart_no))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a450a8df365d3306ea53de5763b6a51e5">UART_TXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#a95d6f1cf76090799914abd3fccfa8a96">UART_TXFIFO_CNT</a>;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordflow">return</span>(used);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="uart_8h.html#a3c0f172370540e0d1840c415c2c7b661">  130</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a3c0f172370540e0d1840c415c2c7b661">tx_fifo_free</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;{</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(uart_no))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a450a8df365d3306ea53de5763b6a51e5">UART_TXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#a95d6f1cf76090799914abd3fccfa8a96">UART_TXFIFO_CNT</a>;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="system_8c.html#a0f8c52d1c359b700088f8417b48e467b">free</a> = <a class="code" href="uart_8h.html#a653fc44b41db6efb3884c15ce8d6c30e">UART_FIFO_LEN</a> - used;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordflow">return</span>(free);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="uart_8h.html#a50e81b3a1433d1947bdff1b9bdf425d3">  143</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a50e81b3a1433d1947bdff1b9bdf425d3">tx_fifo_empty</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;{</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(uart_no))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a450a8df365d3306ea53de5763b6a51e5">UART_TXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#a95d6f1cf76090799914abd3fccfa8a96">UART_TXFIFO_CNT</a>;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="keywordflow">return</span>( used ? 0 : 1);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;}</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="uart_8h.html#a09c378ce1610cb5e63469a4ee6813de2">  155</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a09c378ce1610cb5e63469a4ee6813de2">rx_fifo_used</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;{</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="comment">// number of characters in fifo</span></div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(<a class="code" href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a>))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a760503f72822d1975589fc0e4be1d482">UART_RXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#ae9d6ce323b6534461cfaf1f6bd797f31">UART_RXFIFO_CNT</a>;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">return</span>(used);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;}</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="uart_8h.html#aa59d5d55b7cd6551d97ef6af22949c82">  168</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#aa59d5d55b7cd6551d97ef6af22949c82">rx_fifo_free</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;{</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="comment">// number of characters in fifo</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(<a class="code" href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a>))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a760503f72822d1975589fc0e4be1d482">UART_RXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#ae9d6ce323b6534461cfaf1f6bd797f31">UART_RXFIFO_CNT</a>;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="system_8c.html#a0f8c52d1c359b700088f8417b48e467b">free</a> = <a class="code" href="uart_8h.html#a653fc44b41db6efb3884c15ce8d6c30e">UART_FIFO_LEN</a> - used;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">return</span>(used);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="uart_8h.html#a3ffd1f20ba2ca3ef0894473091b25012">  182</a></span>&#160;<span class="keywordtype">int</span>  <a class="code" href="uart_8c.html#a3ffd1f20ba2ca3ef0894473091b25012">rx_fifo_empty</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;{</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="comment">// number of characters in fifo</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="keywordtype">int</span> used = (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a>(<a class="code" href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a>))&gt;&gt;<a class="code" href="esp8266_2uart__register_8h.html#a760503f72822d1975589fc0e4be1d482">UART_RXFIFO_CNT_S</a>)&amp;<a class="code" href="esp8266_2uart__register_8h.html#ae9d6ce323b6534461cfaf1f6bd797f31">UART_RXFIFO_CNT</a>;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span>( used ? 0 : 1);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;}</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="uart_8h.html#ae0c0e0aa888920f223867fa541b068ac">  199</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#ae0c0e0aa888920f223867fa541b068ac">tx_fifo_putb</a>(<span class="keywordtype">int</span> uart_no, <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c)</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;{</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="uart_8c.html#a3c0f172370540e0d1840c415c2c7b661">tx_fifo_free</a>(uart_no) )</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        WRITE_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a>(uart_no), c);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <a class="code" href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a>(uart_no);</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordflow">return</span>(c);</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    }</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordflow">return</span>(-1);</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;}</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="uart_8h.html#a41c7b573c10fdd3aadc72669f96c2e71">  217</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a41c7b573c10fdd3aadc72669f96c2e71">rx_fifo_getb</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;{</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordflow">if</span>( <a class="code" href="uart_8c.html#a09c378ce1610cb5e63469a4ee6813de2">rx_fifo_used</a>(uart_no) )</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <span class="keywordflow">return</span> (READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a>(<a class="code" href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a>)) &amp; 0xFF);</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">return</span>(-1);</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;}</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="uart_8h.html#a6658637d750ec2e2366ac3881dbd9f6e">  237</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a6658637d750ec2e2366ac3881dbd9f6e">tx_fifo_write</a>(<span class="keywordtype">int</span> uart_no, <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *buf, <span class="keywordtype">int</span> size)</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;{</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tmp;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordtype">int</span>  sent = 0;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="keywordflow">while</span>(size &amp;&amp; <a class="code" href="uart_8c.html#a3c0f172370540e0d1840c415c2c7b661">tx_fifo_free</a>(uart_no))</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        tmp = *buf++;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        WRITE_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a>(uart_no) , tmp);</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        ++sent;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        --size;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="comment">// FIXME</span></div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <a class="code" href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a>(uart_no);</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordflow">return</span>(sent);</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;}</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    </div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="uart_8h.html#a5ee039ccb34468de12203a7027fee1ce">  264</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a5ee039ccb34468de12203a7027fee1ce">rx_fifo_read</a>(<span class="keywordtype">int</span> uart_no, <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *buf, <span class="keywordtype">int</span> size)</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;{</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tmp;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keywordtype">int</span>  <a class="code" href="posix_8c.html#af104a2c05bef787e54c6925616e867df">read</a> = 0;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keywordflow">while</span>(size &amp;&amp; <a class="code" href="uart_8c.html#a09c378ce1610cb5e63469a4ee6813de2">rx_fifo_used</a>(uart_no) )</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        tmp = READ_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a>(<a class="code" href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a>)) &amp; 0xFF;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        *buf++ = tmp;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        ++<a class="code" href="posix_8c.html#af104a2c05bef787e54c6925616e867df">read</a>;</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        --size;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <span class="keywordflow">return</span>(read);</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;}</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;LOCAL <a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="uart_8h.html#a5d37288e478d3aefe796f405d90e2c06">  289</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a5d37288e478d3aefe796f405d90e2c06">uart_putb</a>(uint8 uart_no, uint8 data)</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;{</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="comment">//FIXME verify free before call to tx_free_putc</span></div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordflow">while</span>( !<a class="code" href="uart_8c.html#a3c0f172370540e0d1840c415c2c7b661">tx_fifo_free</a>(uart_no) )</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#ae0c0e0aa888920f223867fa541b068ac">tx_fifo_putb</a>(uart_no, data) );</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;}</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;LOCAL <a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="uart_8h.html#a385bdf5aba0beedc8862cb7afff7fee7">  304</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a385bdf5aba0beedc8862cb7afff7fee7">uart_getb</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;{</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="comment">//FIXME verify empty before call to rx_free_getc</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    <span class="keywordflow">while</span>( <a class="code" href="uart_8c.html#a3ffd1f20ba2ca3ef0894473091b25012">rx_fifo_empty</a>(uart_no) )</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;        <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    c = <a class="code" href="uart_8c.html#a41c7b573c10fdd3aadc72669f96c2e71">rx_fifo_getb</a>(uart_no);</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    <span class="keywordflow">return</span> (c);</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;}</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="uart_8h.html#aad52b616aa1f07c5a59a5ddb6be602dc">  323</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a>(uint8 uart_no, <span class="keywordtype">char</span> c)</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;{</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">if</span> (c == <span class="charliteral">&#39;\r&#39;</span>)</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <a class="code" href="uart_8c.html#a5d37288e478d3aefe796f405d90e2c06">uart_putb</a>(uart_no, <span class="charliteral">&#39;\n&#39;</span>);</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#a5d37288e478d3aefe796f405d90e2c06">uart_putb</a>(uart_no, c) );</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;}</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="uart_8h.html#adf42ba60e6a57087df07a521240569c7">  337</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#adf42ba60e6a57087df07a521240569c7">uart_getc</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;{</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="keywordflow">while</span>(1)</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    {</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        c = <a class="code" href="uart_8c.html#a385bdf5aba0beedc8862cb7afff7fee7">uart_getb</a>(uart_no);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <span class="keywordflow">if</span>(c == <span class="charliteral">&#39;\n&#39;</span>)</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;            <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    }</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="keywordflow">return</span> (c);</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;}</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="uart_8h.html#ad5837c0512e852837f615c22769355c9">  358</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#ad5837c0512e852837f615c22769355c9">uart0_putc</a>(uint8 c)</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;{</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a>(0,c) );</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;}</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="uart_8h.html#a38d52679a02040deeb1484f6880ee1fd">  369</a></span>&#160;<span class="keywordtype">int</span>  <a class="code" href="uart_8c.html#ac64481d3ee365de4479ba579b5736a1c">uart0_getc</a>()</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;{</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#adf42ba60e6a57087df07a521240569c7">uart_getc</a>(0) );</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;}</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="uart_8h.html#a68627c49cc4901c400c82adeea5a6b1d">  382</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a68627c49cc4901c400c82adeea5a6b1d">uart1_putc</a>(uint8 c)</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;{</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a>(1,c) );</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;}</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="uart_8h.html#a148e8cd7cbfcbbd80ad1220f1390e6b8">  393</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a737b67ce3c8c77f547a29a06dd0b45b1">uart1_getc</a>()</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;{</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="uart_8c.html#adf42ba60e6a57087df07a521240569c7">uart_getc</a>(1) );</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="uart_8h.html#a735a90ff2c030a454e0e08d1cd4d79e9">  406</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a735a90ff2c030a454e0e08d1cd4d79e9">uart_flush</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no)</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;{</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED_TX</span></div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    <span class="keywordflow">while</span>(!<a class="code" href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a>(uart_txq[uart_no]) &amp;&amp; <a class="code" href="uart_8c.html#a6f8397ebf08ae984ed48144d0287a048">tx_fifo_used</a>(uart_no))</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        ;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <span class="keywordflow">while</span>(<a class="code" href="uart_8c.html#a6f8397ebf08ae984ed48144d0287a048">tx_fifo_used</a>(uart_no))</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        ;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;}</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED</span></div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED_RX</span></div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;LOCAL <a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8h.html#acc12e198ec89c68b7f51d99a4924ed28">uart_queue_getb</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no)</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;{</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <span class="keywordflow">while</span>(<a class="code" href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a>(uart_rxq[uart_no]))</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    c = <a class="code" href="queue_8c.html#adc939b887e06d9c92507c37fa6a87cb8">queue_popc</a>(uart_rxq[uart_no]);</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    <span class="keywordflow">return</span> (c);</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;}</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="uart_8h.html#ad8e620f0a708b7e3d7ba1aaa623f7692">uart_queue_getc</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no)</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;{</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c;</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    <span class="keywordflow">while</span>(1)</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;    {</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;        c = <a class="code" href="uart_8h.html#acc12e198ec89c68b7f51d99a4924ed28">uart_queue_getb</a>(uart_no);</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;        <span class="keywordflow">if</span>(c == <span class="charliteral">&#39;\r&#39;</span>)</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    }</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <span class="keywordflow">return</span> (c);</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;}</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="uart_8h.html#a7a2b340567e2b891eaf85a00de17d62c">uart0_queue_getc</a>()</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;{</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data = <a class="code" href="uart_8h.html#ad8e620f0a708b7e3d7ba1aaa623f7692">uart_queue_getc</a>(0);</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;}</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="uart_8h.html#abefd5e7ba3ed2b292bc9ac6d842773cb">uart1_queue_getc</a>()</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;{</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    <span class="keywordflow">return</span>(<a class="code" href="uart_8h.html#ad8e620f0a708b7e3d7ba1aaa623f7692">uart_queue_getc</a>(1) );</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;}</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;<span class="preprocessor">#ifdef UART_QUEUED_TX</span></div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;<span class="preprocessor">#ifdef UART_TASK</span></div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8h.html#aac4c92fd5bb979408d209ca8e7c3865c">uart_task</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;{</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data;</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="uart_8c.html#a50e81b3a1433d1947bdff1b9bdf425d3">tx_fifo_empty</a>(0) )</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    { </div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        <span class="keywordflow">if</span>(!<a class="code" href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a>(uart_txq[0]) )</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;        {</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;            data = <a class="code" href="queue_8c.html#adc939b887e06d9c92507c37fa6a87cb8">queue_popc</a>(uart_txq[0]);</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;            WRITE_PERI_REG(<a class="code" href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a>(0), data);</div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;            <a class="code" href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a>(0);</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        }</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    }</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;}</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;LOCAL <a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8h.html#a08addb9b5aa3cbe9dbba1c0c0242a6e6">uart_queue_putb</a>(uint8 uart_no, uint8 data)</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;{</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    <span class="comment">// enable transmit queue to empty existing data</span></div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    <span class="comment">// uart_tx_enable(uart_no);</span></div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    <span class="keywordflow">while</span>(<a class="code" href="queue_8c.html#ace76ddf1f8e6b6b0d836ff6ac0255311">queue_full</a>(uart_txq[uart_no]))</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;      <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    <a class="code" href="queue_8c.html#a918e9bab1d67104964e167722a4d3793">queue_pushc</a>(uart_txq[uart_no], data);</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <span class="comment">// enable transmit queue to empty new data</span></div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    <a class="code" href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a>(uart_no);</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;}</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;<span class="comment"></span><a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> uart_no, <span class="keywordtype">char</span> c)</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;{</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    <span class="keywordflow">if</span> (c == <span class="charliteral">&#39;\r&#39;</span>)</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;        <a class="code" href="uart_8h.html#a08addb9b5aa3cbe9dbba1c0c0242a6e6">uart_queue_putb</a>(uart_no, <span class="charliteral">&#39;\n&#39;</span>);</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    <a class="code" href="uart_8h.html#a08addb9b5aa3cbe9dbba1c0c0242a6e6">uart_queue_putb</a>(uart_no, c);</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;}</div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;</div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8h.html#acf7576240a5fa89eff860522a060c907">uart0_queue_putc</a>(<span class="keywordtype">char</span> c)</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;{</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <a class="code" href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a>(0,c);</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;}</div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;<span class="keywordtype">void</span> <a class="code" href="uart_8h.html#a590b4e9b5fbf412cbad4a6fcb36c3e2d">uart1_queue_putc</a>(<span class="keywordtype">char</span> c)</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;{</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <a class="code" href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a>(1,c);</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;}</div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;</div><div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="uart_8h.html#adba60d396ad1ae85a31880b05758e460">  572</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#adba60d396ad1ae85a31880b05758e460">kbhiteol</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;{</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    <span class="keywordflow">if</span>(uart_rxq[uart_no]-&gt;flags &amp; <a class="code" href="queue_8h.html#a140a823cbbec938f79f3698c4e433d6c">QUEUE_EOL</a> )</div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a>(uart_rxq[uart_no]) )</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;    <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;}</div><div class="line"><a name="l00585"></a><span class="lineno"><a class="line" href="uart_8h.html#a27dccd1929734deb5d318a0cf44bd7c5">  585</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a27dccd1929734deb5d318a0cf44bd7c5">kbhit</a>(<span class="keywordtype">int</span> uart_no)</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;{</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a>(uart_rxq[uart_no]) )</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;}</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;<span class="comment">// =================================================================</span></div><div class="line"><a name="l00604"></a><span class="lineno"><a class="line" href="uart_8h.html#aa018dc93fd77400560f0ab7e8d78f59a">  604</a></span>&#160;<span class="comment"></span></div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;<span class="comment"><div class="ttc" id="esp8266_2uart__register_8h_html_ac6ce538b7a0389b41640e89990d0d76d"><div class="ttname"><a href="esp8266_2uart__register_8h.html#ac6ce538b7a0389b41640e89990d0d76d">UART_INT_ENA</a></div><div class="ttdeci">#define UART_INT_ENA(i)</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00054">uart_register.h:54</a></div></div>
<div class="ttc" id="uart_8c_html_a385bdf5aba0beedc8862cb7afff7fee7"><div class="ttname"><a href="uart_8c.html#a385bdf5aba0beedc8862cb7afff7fee7">uart_getb</a></div><div class="ttdeci">LOCAL MEMSPACE int uart_getb(int uart_no)</div><div class="ttdoc">Read a byte from a uart Note: This function waits/blocks util the read can happen. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00304">uart.c:304</a></div></div>
<div class="ttc" id="uart_8h_html"><div class="ttname"><a href="uart_8h.html">uart.h</a></div></div>
<div class="ttc" id="uart_8c_html_a87198ab19fb4f97a978baf08b478d150"><div class="ttname"><a href="uart_8c.html#a87198ab19fb4f97a978baf08b478d150">uart_tx_disable</a></div><div class="ttdeci">void uart_tx_disable(uint8_t uart_no)</div><div class="ttdoc">Disable transmit interrupts for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00082">uart.c:82</a></div></div>
<div class="ttc" id="uart_8h_html_a590b4e9b5fbf412cbad4a6fcb36c3e2d"><div class="ttname"><a href="uart_8h.html#a590b4e9b5fbf412cbad4a6fcb36c3e2d">uart1_queue_putc</a></div><div class="ttdeci">MEMSPACE void uart1_queue_putc(char c)</div></div>
<div class="ttc" id="user__config_8h_html"><div class="ttname"><a href="user__config_8h.html">user_config.h</a></div><div class="ttdoc">Master include file for project Includes all project includes and defines here. </div></div>
<div class="ttc" id="uart_8h_html_a653fc44b41db6efb3884c15ce8d6c30e"><div class="ttname"><a href="uart_8h.html#a653fc44b41db6efb3884c15ce8d6c30e">UART_FIFO_LEN</a></div><div class="ttdeci">#define UART_FIFO_LEN</div><div class="ttdef"><b>Definition:</b> <a href="uart_8h_source.html#l00065">uart.h:65</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_a450a8df365d3306ea53de5763b6a51e5"><div class="ttname"><a href="esp8266_2uart__register_8h.html#a450a8df365d3306ea53de5763b6a51e5">UART_TXFIFO_CNT_S</a></div><div class="ttdeci">#define UART_TXFIFO_CNT_S</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00090">uart_register.h:90</a></div></div>
<div class="ttc" id="queue_8c_html_ace76ddf1f8e6b6b0d836ff6ac0255311"><div class="ttname"><a href="queue_8c.html#ace76ddf1f8e6b6b0d836ff6ac0255311">queue_full</a></div><div class="ttdeci">size_t queue_full(queue_t *q)</div><div class="ttdoc">Is the ring buffer full ? </div><div class="ttdef"><b>Definition:</b> <a href="queue_8c_source.html#l00140">queue.c:140</a></div></div>
<div class="ttc" id="uart_8c_html_a5ee039ccb34468de12203a7027fee1ce"><div class="ttname"><a href="uart_8c.html#a5ee039ccb34468de12203a7027fee1ce">rx_fifo_read</a></div><div class="ttdeci">MEMSPACE int rx_fifo_read(int uart_no, uint8_t *buf, int size)</div><div class="ttdoc">Read a data buffer from the receive fifo Note: This function does not wait/block util there is enough...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00264">uart.c:264</a></div></div>
<div class="ttc" id="uart_8c_html_a6658637d750ec2e2366ac3881dbd9f6e"><div class="ttname"><a href="uart_8c.html#a6658637d750ec2e2366ac3881dbd9f6e">tx_fifo_write</a></div><div class="ttdeci">MEMSPACE int tx_fifo_write(int uart_no, uint8_t *buf, int size)</div><div class="ttdoc">Write a data buffer to the transmit fifo Note: This function does not wait/block util there is enough...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00237">uart.c:237</a></div></div>
<div class="ttc" id="uart_8h_html_a7d280257d3443fa5f3d6bb7007e2a543"><div class="ttname"><a href="uart_8h.html#a7d280257d3443fa5f3d6bb7007e2a543">uart_queue_putc</a></div><div class="ttdeci">MEMSPACE void uart_queue_putc(uint8_t uart_no, char c)</div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_a95d6f1cf76090799914abd3fccfa8a96"><div class="ttname"><a href="esp8266_2uart__register_8h.html#a95d6f1cf76090799914abd3fccfa8a96">UART_TXFIFO_CNT</a></div><div class="ttdeci">#define UART_TXFIFO_CNT</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00089">uart_register.h:89</a></div></div>
<div class="ttc" id="queue_8c_html_a918e9bab1d67104964e167722a4d3793"><div class="ttname"><a href="queue_8c.html#a918e9bab1d67104964e167722a4d3793">queue_pushc</a></div><div class="ttdeci">int queue_pushc(queue_t *q, uint8_t c)</div><div class="ttdoc">Add a byte to the ring buffer Note: This function does not wait/block util there is enough free space...</div><div class="ttdef"><b>Definition:</b> <a href="queue_8c_source.html#l00216">queue.c:216</a></div></div>
<div class="ttc" id="uart_8c_html_adba60d396ad1ae85a31880b05758e460"><div class="ttname"><a href="uart_8c.html#adba60d396ad1ae85a31880b05758e460">kbhiteol</a></div><div class="ttdeci">int kbhiteol(int uart_no)</div><div class="ttdoc">Has an EOL been read on stdin ? </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00572">uart.c:572</a></div></div>
<div class="ttc" id="queue_8h_html_a140a823cbbec938f79f3698c4e433d6c"><div class="ttname"><a href="queue_8h.html#a140a823cbbec938f79f3698c4e433d6c">QUEUE_EOL</a></div><div class="ttdeci">#define QUEUE_EOL</div><div class="ttdef"><b>Definition:</b> <a href="queue_8h_source.html#l00033">queue.h:33</a></div></div>
<div class="ttc" id="uart_8c_html_adf42ba60e6a57087df07a521240569c7"><div class="ttname"><a href="uart_8c.html#adf42ba60e6a57087df07a521240569c7">uart_getc</a></div><div class="ttdeci">MEMSPACE int uart_getc(int uart_no)</div><div class="ttdoc">Read a byte from a uart with NL to CR/NL conversion Note: This function waits/blocks util the read ca...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00337">uart.c:337</a></div></div>
<div class="ttc" id="uart_8c_html_a6b9147fc5ffaf0a602cc60a8addb8a38"><div class="ttname"><a href="uart_8c.html#a6b9147fc5ffaf0a602cc60a8addb8a38">rx_fifo_flush</a></div><div class="ttdeci">void rx_fifo_flush(int uart_no)</div><div class="ttdoc">Flush receive fifo for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00105">uart.c:105</a></div></div>
<div class="ttc" id="uart_8h_html_acf7576240a5fa89eff860522a060c907"><div class="ttname"><a href="uart_8h.html#acf7576240a5fa89eff860522a060c907">uart0_queue_putc</a></div><div class="ttdeci">MEMSPACE void uart0_queue_putc(char c)</div></div>
<div class="ttc" id="uart_8h_html_abefd5e7ba3ed2b292bc9ac6d842773cb"><div class="ttname"><a href="uart_8h.html#abefd5e7ba3ed2b292bc9ac6d842773cb">uart1_queue_getc</a></div><div class="ttdeci">MEMSPACE uint8_t uart1_queue_getc(void)</div></div>
<div class="ttc" id="uart_8c_html_a41c7b573c10fdd3aadc72669f96c2e71"><div class="ttname"><a href="uart_8c.html#a41c7b573c10fdd3aadc72669f96c2e71">rx_fifo_getb</a></div><div class="ttdeci">MEMSPACE int rx_fifo_getb(int uart_no)</div><div class="ttdoc">Remove a byte from the receive fifo We assume that rx_fifo_used() was called! </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00217">uart.c:217</a></div></div>
<div class="ttc" id="uart_8c_html_a6f8397ebf08ae984ed48144d0287a048"><div class="ttname"><a href="uart_8c.html#a6f8397ebf08ae984ed48144d0287a048">tx_fifo_used</a></div><div class="ttdeci">MEMSPACE int tx_fifo_used(int uart_no)</div><div class="ttdoc">Get the number of bytes used in transmit fifo. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00118">uart.c:118</a></div></div>
<div class="ttc" id="uart_8c_html_a09c378ce1610cb5e63469a4ee6813de2"><div class="ttname"><a href="uart_8c.html#a09c378ce1610cb5e63469a4ee6813de2">rx_fifo_used</a></div><div class="ttdeci">MEMSPACE int rx_fifo_used(int uart_no)</div><div class="ttdoc">Get the number of bytes used in receive fifo. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00155">uart.c:155</a></div></div>
<div class="ttc" id="uart_8c_html_a68627c49cc4901c400c82adeea5a6b1d"><div class="ttname"><a href="uart_8c.html#a68627c49cc4901c400c82adeea5a6b1d">uart1_putc</a></div><div class="ttdeci">MEMSPACE int uart1_putc(uint8 c)</div><div class="ttdoc">Write a byte to uart1 with NL to CR/NL conversion Note: This function waits/blocks util the write can...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00382">uart.c:382</a></div></div>
<div class="ttc" id="uart_8c_html_a08d467da958b2c20aaa794953255d152"><div class="ttname"><a href="uart_8c.html#a08d467da958b2c20aaa794953255d152">uart_debug_port</a></div><div class="ttdeci">int uart_debug_port</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00043">uart.c:43</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_ac7ce3d2ea688e9812d8758ce36d88b3e"><div class="ttname"><a href="esp8266_2uart__register_8h.html#ac7ce3d2ea688e9812d8758ce36d88b3e">UART_RXFIFO_RST</a></div><div class="ttdeci">#define UART_RXFIFO_RST</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00105">uart_register.h:105</a></div></div>
<div class="ttc" id="user__task_8c_html_a863d8bc03e69f2efee6042bcec7b456b"><div class="ttname"><a href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a></div><div class="ttdeci">void optimistic_yield(uint32_t interval_us)</div><div class="ttdef"><b>Definition:</b> <a href="user__task_8c_source.html#l00102">user_task.c:102</a></div></div>
<div class="ttc" id="uart_8c_html_a3c0f172370540e0d1840c415c2c7b661"><div class="ttname"><a href="uart_8c.html#a3c0f172370540e0d1840c415c2c7b661">tx_fifo_free</a></div><div class="ttdeci">MEMSPACE int tx_fifo_free(int uart_no)</div><div class="ttdoc">Get the number of bytes free in transmit fifo. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00130">uart.c:130</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_aa1ab82a46ab6ea6c6fa443acb2301a2e"><div class="ttname"><a href="esp8266_2uart__register_8h.html#aa1ab82a46ab6ea6c6fa443acb2301a2e">UART_TXFIFO_EMPTY_INT_ENA</a></div><div class="ttdeci">#define UART_TXFIFO_EMPTY_INT_ENA</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00062">uart_register.h:62</a></div></div>
<div class="ttc" id="cpu_8h_html_a070d2ce7b6bb7e5c05602aa8c308d0c4"><div class="ttname"><a href="cpu_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></div><div class="ttdeci">#define NULL</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00055">cpu.h:55</a></div></div>
<div class="ttc" id="queue_8c_html_adc939b887e06d9c92507c37fa6a87cb8"><div class="ttname"><a href="queue_8c.html#adc939b887e06d9c92507c37fa6a87cb8">queue_popc</a></div><div class="ttdeci">int queue_popc(queue_t *q)</div><div class="ttdoc">Remove a byte from the ring buffer Note: This function does not wait/block util there is data to meet...</div><div class="ttdef"><b>Definition:</b> <a href="queue_8c_source.html#l00244">queue.c:244</a></div></div>
<div class="ttc" id="uart_8c_html_aa59d5d55b7cd6551d97ef6af22949c82"><div class="ttname"><a href="uart_8c.html#aa59d5d55b7cd6551d97ef6af22949c82">rx_fifo_free</a></div><div class="ttdeci">MEMSPACE int rx_fifo_free(int uart_no)</div><div class="ttdoc">Get the number of bytes free in receive fifo. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00168">uart.c:168</a></div></div>
<div class="ttc" id="structqueue__t_html"><div class="ttname"><a href="structqueue__t.html">queue_t</a></div><div class="ttdoc">queue structure </div><div class="ttdef"><b>Definition:</b> <a href="queue_8h_source.html#l00036">queue.h:36</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_adf96029f1be0842496155dcc8f6868de"><div class="ttname"><a href="esp8266_2uart__register_8h.html#adf96029f1be0842496155dcc8f6868de">UART_RXFIFO_FULL_INT_ENA</a></div><div class="ttdeci">#define UART_RXFIFO_FULL_INT_ENA</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00063">uart_register.h:63</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_ae07a4ee9c7e3c6828d0a2e0a3e4da0bf"><div class="ttname"><a href="esp8266_2uart__register_8h.html#ae07a4ee9c7e3c6828d0a2e0a3e4da0bf">UART_RXFIFO_TOUT_INT_ENA</a></div><div class="ttdeci">#define UART_RXFIFO_TOUT_INT_ENA</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00055">uart_register.h:55</a></div></div>
<div class="ttc" id="posix_8c_html_af104a2c05bef787e54c6925616e867df"><div class="ttname"><a href="posix_8c.html#af104a2c05bef787e54c6925616e867df">read</a></div><div class="ttdeci">MEMSPACE ssize_t read(int fd, const void *buf, size_t count)</div><div class="ttdoc">POSIX read count bytes from *buf to fileno fd. </div><div class="ttdef"><b>Definition:</b> <a href="posix_8c_source.html#l01006">posix.c:1006</a></div></div>
<div class="ttc" id="system_8c_html_a0f8c52d1c359b700088f8417b48e467b"><div class="ttname"><a href="system_8c.html#a0f8c52d1c359b700088f8417b48e467b">free</a></div><div class="ttdeci">MEMSPACE void free(void *p)</div><div class="ttdoc">Free buffer POSIX function We only call os_free() is pointer is not null. </div><div class="ttdef"><b>Definition:</b> <a href="system_8c_source.html#l00087">system.c:87</a></div></div>
<div class="ttc" id="uart_8c_html_a14061d90f6727665218418b15943af7f"><div class="ttname"><a href="uart_8c.html#a14061d90f6727665218418b15943af7f">UARTS</a></div><div class="ttdeci">#define UARTS</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00034">uart.c:34</a></div></div>
<div class="ttc" id="queue_8c_html_a5c47c1a42dc50ea36aab9629c4378b37"><div class="ttname"><a href="queue_8c.html#a5c47c1a42dc50ea36aab9629c4378b37">queue_empty</a></div><div class="ttdeci">size_t queue_empty(queue_t *q)</div><div class="ttdoc">Is the ring buffer empty ? </div><div class="ttdef"><b>Definition:</b> <a href="queue_8c_source.html#l00114">queue.c:114</a></div></div>
<div class="ttc" id="uart_8h_html_a7a2b340567e2b891eaf85a00de17d62c"><div class="ttname"><a href="uart_8h.html#a7a2b340567e2b891eaf85a00de17d62c">uart0_queue_getc</a></div><div class="ttdeci">MEMSPACE uint8_t uart0_queue_getc(void)</div></div>
<div class="ttc" id="uart_8c_html_aad52b616aa1f07c5a59a5ddb6be602dc"><div class="ttname"><a href="uart_8c.html#aad52b616aa1f07c5a59a5ddb6be602dc">uart_putc</a></div><div class="ttdeci">MEMSPACE int uart_putc(uint8 uart_no, char c)</div><div class="ttdoc">Write a byte from a uart with NL to CR/NL conversion Note: This function waits/blocks util the write ...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00323">uart.c:323</a></div></div>
<div class="ttc" id="uart_8h_html_acc12e198ec89c68b7f51d99a4924ed28"><div class="ttname"><a href="uart_8h.html#acc12e198ec89c68b7f51d99a4924ed28">uart_queue_getb</a></div><div class="ttdeci">LOCAL MEMSPACE int uart_queue_getb(uint8_t uart_no)</div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_ae9d6ce323b6534461cfaf1f6bd797f31"><div class="ttname"><a href="esp8266_2uart__register_8h.html#ae9d6ce323b6534461cfaf1f6bd797f31">UART_RXFIFO_CNT</a></div><div class="ttdeci">#define UART_RXFIFO_CNT</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00094">uart_register.h:94</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html"><div class="ttname"><a href="esp8266_2uart__register_8h.html">uart_register.h</a></div></div>
<div class="ttc" id="uart_8c_html_a737b67ce3c8c77f547a29a06dd0b45b1"><div class="ttname"><a href="uart_8c.html#a737b67ce3c8c77f547a29a06dd0b45b1">uart1_getc</a></div><div class="ttdeci">MEMSPACE int uart1_getc()</div><div class="ttdoc">Read a byte from uart1 with NL to CR/NL conversion Note: This function waits/blocks util the read can...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00393">uart.c:393</a></div></div>
<div class="ttc" id="uart_8c_html_ae08356fea716912edfef1013171b24ba"><div class="ttname"><a href="uart_8c.html#ae08356fea716912edfef1013171b24ba">uart_rx_enable</a></div><div class="ttdeci">void uart_rx_enable(uint8 uart_no)</div><div class="ttdoc">Enable receive interrupts for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00052">uart.c:52</a></div></div>
<div class="ttc" id="uart_8c_html_a5d37288e478d3aefe796f405d90e2c06"><div class="ttname"><a href="uart_8c.html#a5d37288e478d3aefe796f405d90e2c06">uart_putb</a></div><div class="ttdeci">LOCAL MEMSPACE int uart_putb(uint8 uart_no, uint8 data)</div><div class="ttdoc">Polled Blocking I/O functions that poll. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00289">uart.c:289</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_a760503f72822d1975589fc0e4be1d482"><div class="ttname"><a href="esp8266_2uart__register_8h.html#a760503f72822d1975589fc0e4be1d482">UART_RXFIFO_CNT_S</a></div><div class="ttdeci">#define UART_RXFIFO_CNT_S</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00095">uart_register.h:95</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_a92e318703bd3a12db8856182b046f76f"><div class="ttname"><a href="esp8266_2uart__register_8h.html#a92e318703bd3a12db8856182b046f76f">UART_CONF0</a></div><div class="ttdeci">#define UART_CONF0(i)</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00097">uart_register.h:97</a></div></div>
<div class="ttc" id="cpu_8h_html_ad0fe97585b8891f5e4f2b9a6426330a4"><div class="ttname"><a href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="ttdeci">#define MEMSPACE</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00025">cpu.h:25</a></div></div>
<div class="ttc" id="uart_8c_html_a3ffd1f20ba2ca3ef0894473091b25012"><div class="ttname"><a href="uart_8c.html#a3ffd1f20ba2ca3ef0894473091b25012">rx_fifo_empty</a></div><div class="ttdeci">MEMSPACE int rx_fifo_empty(int uart_no)</div><div class="ttdoc">Test if the receive fifo is empty. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00182">uart.c:182</a></div></div>
<div class="ttc" id="uart_8h_html_a0508661f121639ffdee7de2353a0def2"><div class="ttname"><a href="uart_8h.html#a0508661f121639ffdee7de2353a0def2">UART0</a></div><div class="ttdeci">#define UART0</div><div class="ttdef"><b>Definition:</b> <a href="uart_8h_source.html#l00029">uart.h:29</a></div></div>
<div class="ttc" id="uart_8c_html_a50e81b3a1433d1947bdff1b9bdf425d3"><div class="ttname"><a href="uart_8c.html#a50e81b3a1433d1947bdff1b9bdf425d3">tx_fifo_empty</a></div><div class="ttdeci">MEMSPACE int tx_fifo_empty(int uart_no)</div><div class="ttdoc">Test if the transmit fifo is empty. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00143">uart.c:143</a></div></div>
<div class="ttc" id="uart_8h_html_aac4c92fd5bb979408d209ca8e7c3865c"><div class="ttname"><a href="uart_8h.html#aac4c92fd5bb979408d209ca8e7c3865c">uart_task</a></div><div class="ttdeci">void uart_task(void)</div></div>
<div class="ttc" id="uart_8c_html_a4c32ce5693fc8c1a40244b5cc82e796e"><div class="ttname"><a href="uart_8c.html#a4c32ce5693fc8c1a40244b5cc82e796e">uart_rx_disable</a></div><div class="ttdeci">void uart_rx_disable(uint8 uart_no)</div><div class="ttdoc">Disable receive interrupts for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00062">uart.c:62</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_a100bbf8ae46bfc48a6bc9a927d100917"><div class="ttname"><a href="esp8266_2uart__register_8h.html#a100bbf8ae46bfc48a6bc9a927d100917">UART_FIFO</a></div><div class="ttdeci">#define UART_FIFO(i)</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00028">uart_register.h:28</a></div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_aea9aaa17f3b5847f810191afe34de2db"><div class="ttname"><a href="esp8266_2uart__register_8h.html#aea9aaa17f3b5847f810191afe34de2db">UART_TXFIFO_RST</a></div><div class="ttdeci">#define UART_TXFIFO_RST</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00104">uart_register.h:104</a></div></div>
<div class="ttc" id="uart_8c_html_ae0c0e0aa888920f223867fa541b068ac"><div class="ttname"><a href="uart_8c.html#ae0c0e0aa888920f223867fa541b068ac">tx_fifo_putb</a></div><div class="ttdeci">MEMSPACE int tx_fifo_putb(int uart_no, uint8_t c)</div><div class="ttdoc">Add a byte to the trasmit fifo We assume that tx_fifo_free() was called! </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00199">uart.c:199</a></div></div>
<div class="ttc" id="uart_8c_html_a27dccd1929734deb5d318a0cf44bd7c5"><div class="ttname"><a href="uart_8c.html#a27dccd1929734deb5d318a0cf44bd7c5">kbhit</a></div><div class="ttdeci">int kbhit(int uart_no)</div><div class="ttdoc">Has ANY character been read in stdin. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00585">uart.c:585</a></div></div>
<div class="ttc" id="uart_8c_html_a9fee6d0362cbec0ae882acb55d3a825f"><div class="ttname"><a href="uart_8c.html#a9fee6d0362cbec0ae882acb55d3a825f">uart_tx_enable</a></div><div class="ttdeci">void uart_tx_enable(uint8_t uart_no)</div><div class="ttdoc">Enable transmit interrupts for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00072">uart.c:72</a></div></div>
<div class="ttc" id="send_8c_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00017">send.c:17</a></div></div>
<div class="ttc" id="uart_8c_html_a69f8feef88b9921367f37e8db445eeaf"><div class="ttname"><a href="uart_8c.html#a69f8feef88b9921367f37e8db445eeaf">tx_fifo_flush</a></div><div class="ttdeci">void tx_fifo_flush(int uart_no)</div><div class="ttdoc">Flush transmit fifo for a uart. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00094">uart.c:94</a></div></div>
<div class="ttc" id="uart_8c_html_a735a90ff2c030a454e0e08d1cd4d79e9"><div class="ttname"><a href="uart_8c.html#a735a90ff2c030a454e0e08d1cd4d79e9">uart_flush</a></div><div class="ttdeci">MEMSPACE void uart_flush(uint8_t uart_no)</div><div class="ttdoc">Flush TX buffer Note: This function waits/blocks util the write happen. </div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00406">uart.c:406</a></div></div>
<div class="ttc" id="uart_8h_html_a08addb9b5aa3cbe9dbba1c0c0242a6e6"><div class="ttname"><a href="uart_8h.html#a08addb9b5aa3cbe9dbba1c0c0242a6e6">uart_queue_putb</a></div><div class="ttdeci">LOCAL MEMSPACE void uart_queue_putb(uint8 uart_no, uint8 data)</div></div>
<div class="ttc" id="uart_8c_html_ad5837c0512e852837f615c22769355c9"><div class="ttname"><a href="uart_8c.html#ad5837c0512e852837f615c22769355c9">uart0_putc</a></div><div class="ttdeci">MEMSPACE int uart0_putc(uint8 c)</div><div class="ttdoc">Write a byte to uart0 with NL to CR/NL conversion Note: This function waits/blocks util the write can...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00358">uart.c:358</a></div></div>
<div class="ttc" id="uart_8h_html_ad8e620f0a708b7e3d7ba1aaa623f7692"><div class="ttname"><a href="uart_8h.html#ad8e620f0a708b7e3d7ba1aaa623f7692">uart_queue_getc</a></div><div class="ttdeci">MEMSPACE uint8_t uart_queue_getc(uint8_t uart_no)</div></div>
<div class="ttc" id="esp8266_2uart__register_8h_html_aa069c3a91501d33accc3c760840fd29a"><div class="ttname"><a href="esp8266_2uart__register_8h.html#aa069c3a91501d33accc3c760840fd29a">UART_STATUS</a></div><div class="ttdeci">#define UART_STATUS(i)</div><div class="ttdef"><b>Definition:</b> <a href="esp8266_2uart__register_8h_source.html#l00085">uart_register.h:85</a></div></div>
<div class="ttc" id="uart_8c_html_ac64481d3ee365de4479ba579b5736a1c"><div class="ttname"><a href="uart_8c.html#ac64481d3ee365de4479ba579b5736a1c">uart0_getc</a></div><div class="ttdeci">MEMSPACE int uart0_getc()</div><div class="ttdoc">Read a byte from uart0 with NL to CR/NL conversion Note: This function waits/blocks util the read can...</div><div class="ttdef"><b>Definition:</b> <a href="uart_8c_source.html#l00369">uart.c:369</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
